import request from '/@/utils/request';

/**
 * 
 * @method getMenu 从后台获取动态路由菜单
 * 
 */
export function routerApi() {
	return {
		getMenu: (params?: object) => {
			return request({
				url: '/api/menu/getMenu',
				method: 'GET',
				params,
			}).then((res) => {
				if (res.data.code === "000000") {
				  return Promise.resolve(res.data)
				}
				return Promise.reject(res)
			});
		}
	};
}
